@echo off
setlocal

:: 设置 Sentinel 配置文件和日志文件路径
set SENTINEL_DIR=.

:: 启动 Redis Sentinel 26379
echo Starting Redis Sentinel 26379...
start "" "%SENTINEL_DIR%\redis-sentinel.exe" "%SENTINEL_DIR%\sentinel-26379.conf"

:: 启动 Redis Sentinel 26380
echo Starting Redis Sentinel 26380...
start "" "%SENTINEL_DIR%\redis-sentinel.exe" "%SENTINEL_DIR%\sentinel-26380.conf"

:: 启动 Redis Sentinel 26381
echo Starting Redis Sentinel 26381...
start "" "%SENTINEL_DIR%\redis-sentinel.exe" "%SENTINEL_DIR%\sentinel-26381.conf"

:: 等待 Sentinel 节点启动
echo Waiting for Redis Sentinels to start...
timeout /t 10 /nobreak

echo Redis Sentinel instances and clients started!

endlocal
pause
